package com.tengju.settlement.infrastructure.repository.convert;

import com.tengju.settlement.domain.model.account.FrozenDetail;
import com.tengju.settlement.infrastructure.persistence.mybatis.dataobject.FrozenDetailDO;

import java.time.LocalDateTime;

public class FrozenDetailConvert {

    public static FrozenDetailDO convert(FrozenDetail frozenDetail) {
        return new FrozenDetailDO(frozenDetail.getId().getValue(),
                frozenDetail.getIdCode().getValue(),
                frozenDetail.getBizId(),
                frozenDetail.getCycleAddId(),
                frozenDetail.getBizCode(),
                frozenDetail.getAccountId().getValue(),
                frozenDetail.getFreezeAmount().getValue(),
                frozenDetail.getStatus().getVal(),
                frozenDetail.getCreatedBy(),
                frozenDetail.getUpdatedBy(),
                LocalDateTime.now(),
                LocalDateTime.now(),
                ""
                );
    }
}
